﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoadQualityEvaluatorData.DomainServices.Generic
{
    public interface IRepository<TEntity> : IDisposable where TEntity : class
    {
        //public IUnitOfWork Session { get; }

        IList<TEntity> GetAll();
        TEntity GetById(int id);
        TEntity Get(TEntity entity);

        bool Add(TEntity entity);
        bool Update(TEntity entity);
        bool Delete(TEntity entity);
        bool DeleteById(int id);

    }
}
